#pragma once
#include "global_include.h"
#include "C3DTriangle.h"
#include "c3dobject.h"
#include "C3DTexture.h"

class C3DModel :
	public C3DObject
{
public:
	C3DModel(void);
	virtual ~C3DModel(void);
	
	virtual void Draw();

	void Create(int size);
	void SetTriangle(int index, const C3DTriangle&  triangle);
	void Clear();
	bool LoadModel(char* filename);
	void CalculateNormals();

private:
	int m_triSize;
	C3DTriangle* m_triArray;
	bool m_texOwnsMemory;
	int m_texSize;
	C3DTexture* m_texArray;
};
